Skip to content

Conversation

@EdwardX29
Copy link
Contributor

Enable compression levels by changing block.Compression to be composed of a Family and Level. Expose new enums to Cockroach.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@EdwardX29 EdwardX29 force-pushed the edwardx29/compression-levels branch 5 times, most recently from 3dc71b4 to 7fdb372 Compare April 9, 2025 21:21
@EdwardX29 EdwardX29 changed the title [WIP] sstable: enable compression levels sstable: enable compression levels Apr 9, 2025
@EdwardX29 EdwardX29 marked this pull request as ready for review April 9, 2025 21:30
@EdwardX29 EdwardX29 requested a review from a team as a code owner April 9, 2025 21:30
@EdwardX29 EdwardX29 requested a review from jbowens April 9, 2025 21:30
Enable compression levels by changing block.Compression to be
composed of a Family and Level. Expose new enums to Cockroach.
@EdwardX29 EdwardX29 force-pushed the edwardx29/compression-levels branch from 7fdb372 to a2b7d52 Compare April 9, 2025 21:34
@EdwardX29 EdwardX29 marked this pull request as draft April 9, 2025 22:57
@EdwardX29 EdwardX29 changed the title sstable: enable compression levels [WIP] sstable: enable compression levels Apr 9, 2025
Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 19 files reviewed, 2 unresolved discussions (waiting on @jbowens)


sstable/block/compression.go line 86 at r1 (raw file):

var DefaultCompression = Compression{Family: DefaultCompressionFamily, Level: LevelDefault}
var NoCompression = Compression{Family: NoCompressionFamily, Level: LevelDefault}
var SnappyCompression = Compression{Family: SnappyCompressionFamily, Level: LevelDefault}

We should use ZstdLevelDefault, etc.


options.go line 54 at r1 (raw file):

	// Zstd compression levels.
	ZstdCompressionLevel1  = block.Compression{Family: block.ZstdCompressionFamily, Level: block.ZstdLevel1}

I don't think level should be an enum.. It's always integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants